<?php
/**



 * @package    sketchup

 * @subpackage 

 * @author     Chris Borkowski {@link http://www.guggenheim.org}

 * @author     Created on 04-April-2009

 */

// no direct access

defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.view');

/**
 * HTML View class for the sketchup Component
 *
 * @package    sketchup
 */

class ViewSearch extends JView
{
	function display($tpl = null)
	{
		global $option, $mainframe;

		$params = &$mainframe->getParams();
		
		$list =& $this->get('Data'); 
		
		for($i = 0; $i < count($list); $i++) 
		{ 
			$row =& $list[$i]; 
			$row->link = JRoute::_('index.php?option=' . $option .'&id=' . $row->id  . '&view=project'); 		
		}

		$vote_link = JRoute::_('index.php?option=' . $option . '&view=vote' );

     
        $pagination =& $this->get('pagination');

		$search = $this->get('search');
		$this->assign('search', $search);
		$filter_country = $this->get('FilterCountry');
		$this->assign('filter_country', $filter_country);

		//set page title
		$document = & JFactory::getDocument();
		$document->setTitle('Search Shelters');
		$page_title = 'Search Shelters';
		$keyword ='Keyword:';

		//breadcrumbs 
		global $mainframe;
		$pathway = & $mainframe->getPathway();
		$pathway->addItem('$page_title', '');

		// push data into the template
		$this->assignRef('pagination', $pagination);
		$this->assign('show_share', $params->get('show_share', '1'));	
		$this->assignRef('filter', $filter); 
		$this->assignRef('list', $list); 
		$this->assignRef('vote_link', $vote_link);
		
		parent::display($tpl);	
	}
} 

?>
